<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class pr_excel_model extends Base_model  {
	
	public function __construct()
	{
		parent::__construct();			
	}
	function getBuku() {
		$this->db->select('*');
		$this->db->from('tb_book');
		$this->db->order_by('id','DESC');
		$getData = $this->db->get();
		if($getData->num_rows() > 0)
		return $getData->result_array();
		else
		return null;
		}
	//query for get all data
	function toExcelAll() {
		$this->db->select('*');
		$this->db->from('tbl_product');
		$this->db->order_by('pd_id','desc');
		$getData = $this->db->get();
		if($getData->num_rows() > 0)
		return $getData->result_array();
		else
		return null;
	}
}
?>